// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * SalesruleProductAttribute generated by hbm2java
 */
@Entity
@Table(name = "salesrule_product_attribute", catalog = "magento")
public class SalesruleProductAttribute implements java.io.Serializable {

	private SalesruleProductAttributeId id;
	private CoreWebsite coreWebsite;
	private EavAttribute eavAttribute;
	private Salesrule salesrule;
	private CustomerGroup customerGroup;

	public SalesruleProductAttribute() {
	}

	public SalesruleProductAttribute(SalesruleProductAttributeId id,
			CoreWebsite coreWebsite, EavAttribute eavAttribute,
			Salesrule salesrule, CustomerGroup customerGroup) {
		this.id = id;
		this.coreWebsite = coreWebsite;
		this.eavAttribute = eavAttribute;
		this.salesrule = salesrule;
		this.customerGroup = customerGroup;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "ruleId", column = @Column(name = "rule_id", nullable = false)),
			@AttributeOverride(name = "websiteId", column = @Column(name = "website_id", nullable = false)),
			@AttributeOverride(name = "customerGroupId", column = @Column(name = "customer_group_id", nullable = false)),
			@AttributeOverride(name = "attributeId", column = @Column(name = "attribute_id", nullable = false)) })
	public SalesruleProductAttributeId getId() {
		return this.id;
	}

	public void setId(SalesruleProductAttributeId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "website_id", nullable = false, insertable = false, updatable = false)
	public CoreWebsite getCoreWebsite() {
		return this.coreWebsite;
	}

	public void setCoreWebsite(CoreWebsite coreWebsite) {
		this.coreWebsite = coreWebsite;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "attribute_id", nullable = false, insertable = false, updatable = false)
	public EavAttribute getEavAttribute() {
		return this.eavAttribute;
	}

	public void setEavAttribute(EavAttribute eavAttribute) {
		this.eavAttribute = eavAttribute;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "rule_id", nullable = false, insertable = false, updatable = false)
	public Salesrule getSalesrule() {
		return this.salesrule;
	}

	public void setSalesrule(Salesrule salesrule) {
		this.salesrule = salesrule;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "customer_group_id", nullable = false, insertable = false, updatable = false)
	public CustomerGroup getCustomerGroup() {
		return this.customerGroup;
	}

	public void setCustomerGroup(CustomerGroup customerGroup) {
		this.customerGroup = customerGroup;
	}

}
